Handle RBSLocation and RBSLocationList types#58
Merged
alexcrocha merged 1 commit intoar-rust-rbs-buildfrom Nov 19, 2025
Merged
Conversation
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
vinistock
approved these changes
Nov 19, 2025
Member
vinistock
left a comment
There was a problem hiding this comment.
Nice. Just a small question about the data type for the start and end byte positions.
rust/ruby-rbs/src/lib.rs
Outdated
Comment on lines
90
to
96
| pub fn start_loc(&self) -> usize { | ||
| unsafe { (*self.pointer).rg.start.byte_pos as usize } | ||
| } | ||
|
|
||
| pub fn end_loc(&self) -> usize { | ||
| unsafe { (*self.pointer).rg.end.byte_pos as usize } | ||
| } |
Member
There was a problem hiding this comment.
What's the original type of byte_pos? I noticed we're casting it to usize, but if this is a smaller type (like u32), I'd say we keep that for lower memory usage and clients of the API can decide if they want to broaden the type.
Many AST nodes in config.yml have location fields (rbs_location, rbs_location_list). This change adds the necessary wrapper structs (RBSLocation, RBSLocationList) and updates build.rs to generate accessors for these fields. The RBSLocation wrapper includes a reference to the parser to support future functionality like source extraction.
82f84a2 to
090c099
Compare
alexcrocha
added a commit
that referenced
this pull request
Jan 13, 2026
Many AST nodes in `config.yml` have location fields (`rbs_location`, `rbs_location_list`). This change adds the necessary wrapper structs (`RBSLocation`, `RBSLocationList`) and updates `build.rs` to generate accessors for these fields. The `RBSLocation` wrapper includes a reference to the parser to support future functionality like source extraction.
alexcrocha
added a commit
that referenced
this pull request
Jan 13, 2026
Many AST nodes in `config.yml` have location fields (`rbs_location`, `rbs_location_list`). This change adds the necessary wrapper structs (`RBSLocation`, `RBSLocationList`) and updates `build.rs` to generate accessors for these fields. The `RBSLocation` wrapper includes a reference to the parser to support future functionality like source extraction.
alexcrocha
added a commit
that referenced
this pull request
Jan 14, 2026
Many AST nodes in `config.yml` have location fields (`rbs_location`, `rbs_location_list`). This change adds the necessary wrapper structs (`RBSLocation`, `RBSLocationList`) and updates `build.rs` to generate accessors for these fields. The `RBSLocation` wrapper includes a reference to the parser to support future functionality like source extraction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Many AST nodes in
config.ymlhave location fields (rbs_location,rbs_location_list). This change adds the necessary wrapper structs (RBSLocation,RBSLocationList) and updatesbuild.rsto generate accessors for these fields.The
RBSLocationwrapper includes a reference to the parser to support future functionality like source extraction.